﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SelfService.DataAccess.Migrations
{
    public partial class 支付订单增加客户端 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "ClientId",
                table: "SysPays",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");

            migrationBuilder.CreateIndex(
                name: "IX_SysPays_ClientId",
                table: "SysPays",
                column: "ClientId");

            migrationBuilder.AddForeignKey(
                name: "FK_SysPays_SysClients_ClientId",
                table: "SysPays",
                column: "ClientId",
                principalTable: "SysClients",
                principalColumn: "ID");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_SysPays_SysClients_ClientId",
                table: "SysPays");

            migrationBuilder.DropIndex(
                name: "IX_SysPays_ClientId",
                table: "SysPays");

            migrationBuilder.DropColumn(
                name: "ClientId",
                table: "SysPays");
        }
    }
}
